package com.reef.entity;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor

@Entity
@Table(name = "reader")//设置《读者表》表名
@JsonIgnoreProperties(value = {"hibernateLazyInitializer","handler"})//懒加载
public class Reader {
@Id //设置主键
@GeneratedValue(strategy = GenerationType.IDENTITY)//主键生成的机制
  private int r_id;//卡号
  private String name;//姓名
  private String password;//密码
  private String sex;//性别
  private int borrowbook;//已经借了多少书
  private int givenbook;//已归还多少书
  private int bigbook;//最大借书
  private String section;//科室
  private String profession;//专业
  private int staus;//状态 1为老师，2为学生
  private String remark;//备注
  private Integer res1;
  private Integer res2;
  private Integer res3;
  private String res4;
  private String res5;
  private String res6;
public Reader(int r_id, String name, String password, String sex, int borrowbook, int givenbook, int bigbook,
		String profession, int staus, String remark) {
	super();
	this.r_id = r_id;
	this.name = name;
	this.password = password;
	this.sex = sex;
	this.borrowbook = borrowbook;
	this.givenbook = givenbook;
	this.bigbook = bigbook;
	this.profession = profession;
	this.staus = staus;
	this.remark = remark;
}
public Reader(int r_id, String name, String password, String sex, int borrowbook, int givenbook, int bigbook,
		 int staus, String section,String remark) {
	super();
	this.r_id = r_id;
	this.name = name;
	this.password = password;
	this.sex = sex;
	this.borrowbook = borrowbook;
	this.givenbook = givenbook;
	this.bigbook = bigbook;
	this.section = section;
	this.staus = staus;
	this.remark = remark;
}


}
